from django.utils import timezone
from django.db import models

# Create your models here.

# User

class User(models.Model):
    username = models.CharField(max_length=30,verbose_name='用户名')
    password = models.CharField(max_length=256,verbose_name='密码')
    phone = models.CharField("手机号",max_length=11)
    created_time = models.DateTimeField(verbose_name='注册时间',default=timezone.now)
    last_login = models.DateTimeField(verbose_name='最后一次登陆',default=timezone.now)
    def __str__(self):
        return self.username
    class Meta:
        db_table ='tb_user'